//
//  HttpRequestManager.h
//  HttpLibraries
//
//  Created by admin on 2018/10/11.
//  Copyright © 2018年 admin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HttpAPIConfig.h"
#import "HttpUploadFile.h"

NS_ASSUME_NONNULL_BEGIN

@interface HttpRequestManager : NSObject


/**
 *  创建单例对象
 */
+ (instancetype)sharedInstance;

/**
 设置网络请求头部信息

 @param requestHeader -头部信息
 */
- (void)setRequestHeader:(NSDictionary<NSString*,NSString*> *)requestHeader;


/**
 *  文件上传
 */

- (void)upload:(NSString *)url params:(NSDictionary *)params fileConfigs:(NSArray<HttpUploadFile *> *)fileConfigs
       response:(Class)responseClass callback:(HttpResponseBlock)callback;

/**
 *  通用
 *  网络请求
 */
- (void)requestWithURL:(NSString *)url method:(HttpMethod)method params:(NSDictionary *)params response:(Class)responseClass callback:(HttpResponseBlock)callback;

/**
 *  取消所有网络请求
 */
- (void)cancelAllOperations;

/**
 * 获取cookie
 **/
- (void)requestCookie:(NSString *)url callback:(HttpResponseBlock)callback;

/**
 * 从cache中获取cache
 */
- (void)getCookieByCache;

/**
 *删除cookie
 */
- (void)removeCookie;


@end
NS_ASSUME_NONNULL_END
